import React from 'react';
import { useNavigate } from 'react-router-dom';
import { Button, Result } from 'antd';
import './NotFound.scss';

export default function NotFound() {
  const navigate = useNavigate();
  // 跳转到推荐页
  const backRecommend = () => {
    navigate('/recommend')
  };
  
  return (
    <Result
      status="404"
      title="404"
      subTitle="Sorry, the page you visited does not exist."
      extra={<Button type="default" onClick={backRecommend}>点击跳转到推荐页</Button>}
    />
  )
}
